package com.java2_7;

import java.util.Random;

public class util {

    //方法类 -- 创立一个静态方法，只存在一个但是全都可用，直接调用
    public static String verifyNumber() {
        String allverifyNumber = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
        String code = "";
        Random r = new Random();
        for (int i = 0; i < 5; i++) {
            int ret = r.nextInt(allverifyNumber.length());
            code += allverifyNumber.charAt(ret);
        }
        return code;
    }


}
